import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86186
 * Date: 2023-10-10
 * Time: 22:33
 */
public class Test {
    //走方格的方案数
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        int n = in.nextInt();
        int m = in.nextInt();
        System.out.println(med(n,m));
    }

    private static int med(int n, int m) {
        if ((n == 1 && m >= 1) || (m == 1 && n >= 1)) return m + n;
        return med(n-1, m) + med(n, m - 1);
    }

    //另类加法
    public int addAB(int a, int b) {
        // write code here
        while (b != 0) {
            int x = a ^ b;
            int y = a & b;
            a = x;
            b = y << 1;
        }

        return a;
    }
}
